package com.jzlin.funhub.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jzlin.funhub.admin.model.dto.ArticlePageDTO;
import com.jzlin.funhub.admin.model.dto.ArticlePageParamsDTO;
import com.jzlin.funhub.admin.model.entity.Article;
import com.jzlin.funhub.admin.model.resp.ArticleDetailResp;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 博客文章表 Mapper 接口
 * </p>
 *
 * @author jzlin
 * @since 2025-07-15
 */
public interface ArticleMapper extends BaseMapper<Article> {
    /**
     * 分页查询
     *
     * @param page 分页参数
     * @return
     */
    Page<ArticlePageDTO> queryPage(IPage<?> page, ArticlePageParamsDTO params);

    /**
     * 查询文章详情
     *
     * @param articleId 文章id
     * @return
     */
    ArticleDetailResp queryDetailById(@Param("articleId") Long articleId);
}
